// page/member/notice.js
Page({
    data: {
        isHide: 0,
        msg: {
            icon: "/images/icon/nodata.png",
            desc: "暂无消息"
        }
    },
    onLoad: function (options) {
        var that = this
        that.setData({
            isHide: 1,
            notice: [
                { date: "前天 9:00", title: "预约通知", content: "李小圆教练拒绝了你的预约申请，原因是李小圆教练拒绝了你的预约申请，原因是...", show: false },
                { date: "2017-12-21 13:12", title: "预约通知", content: "李小圆教练拒绝了你的预约申请，原因是李小圆教练拒绝了你的预约申请，原因是...", show: false },
                { date: "2017-12-21 13:12", title: "预约通知", content: "李小圆教练拒绝了你的预约申请，原因是李小圆教练拒绝了你的预约申请，原因是...", show: false },
                { date: "2017-12-21 13:12", title: "预约通知", content: "李小圆教练拒绝了你的预约申请，原因是李小圆教练拒绝了你的预约申请，原因是...", show: false },
                { date: "2017-12-21 13:12", title: "预约通知", content: "李小圆教练拒绝了你的预约申请，原因是李小圆教练拒绝了你的预约申请，原因是...", show: false }
            ]
        })
    },
    showContent: function (e) {
        var that = this
        var idx = e.currentTarget.dataset.id
        var notice = that.data.notice
        notice[idx].show = !notice[idx].show
        that.setData({
            notice: notice
        })
    }
})